import request from '@/utils/request'

const BASE_URL = '/database/'
export function getDataBaseList(params) {
  return request({
    url: BASE_URL,
    method: 'get',
    params: params
  })
}

export function getDataBase(id) {
  return request({
    url: BASE_URL + id + '/',
    method: 'get'
  })
}

export function createDataBase(data) {
  return request({
    url: BASE_URL,
    method: 'post',
    data: data
  })
}

export function updateDataBase(id, data) {
  return request({
    url: BASE_URL + id + '/',
    method: 'patch',
    data: data
  })
}

export function deleteDataBase(id) {
  return request({
    url: BASE_URL + id + '/',
    method: 'delete'
  })
}
